package com.example.videoweb.service.impl;

import com.example.videoweb.dao.StatisticalMapper;
import com.example.videoweb.domain.Statistical;
import com.example.videoweb.service.StatisticalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class StatisticalServiceImpl implements StatisticalService {

    @Autowired
    private StatisticalMapper statisticalMapper;

    @Override
    public List<Statistical> selectBySex() {
        return statisticalMapper.selectBySex();
    }

    @Override
    public List<Statistical> selectByStyle() {
        return statisticalMapper.selectByStyle();
    }

    @Override
    public boolean numUp(String itemName) {
        return statisticalMapper.numUp(itemName) > 0;
    }

    @Override
    public boolean numDown(String itemName) {
        return statisticalMapper.numDown(itemName) > 0;
    }
}
